<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>OA首页</title>
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/plugin/jquery-easyui-1.2.4/themes/gray/easyui.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/plugin/jquery-easyui-1.2.4/themes/icon.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/css/Default.css" />
		<style type="text/css">
		body {
			font-family: 微软雅黑, 新宋体;
		}
		
		a {
			color: Black;
			text-decoration: none;
		}
		
		.easyui-tree li {
			margin: 5px 0px 0px 0px;
			padding: 1px;
		}
		
		#mainlogo {
			position: absolute;
			top: 0px;
			left: 0px;
			width: 575px;
			height: 72px;
		}
		
		#center {
			padding-left: 575px;
			padding-right: 425px;
		}
		
		#mainctrl {
			position: absolute;
			top: 0px;
			right: 0px;
			height: 72px;
			width: 425px;
		}
		
		.top {
			height: 76px;
			background-color: #00211D;
			background-image: url(<%=path%>/images/top-back.gif);
			background-repeat: repeat-x;
		}
		
		.wel {
			height: 30px;
			line-height: 30px;
			color: #FFFFFF;
			font-size: 14px;
			text-align: right;
			padding-right: 5px;
		}
		
		.ctr {
			vertical-align: middle;
			margin-top: 18px;
			height: 24px;
			text-align: right;
			background-image: url(<%=path%>/images/beijing.gif);
			background-repeat: repeat-x;
		}
		
		.ctr li {
			float: left;
			list-style: none;
		}
		
		.zi {
			padding-right: 16px;
			padding-left: 3px;
		}
		
		a.v1:visited,a.v1:active,a.v1:link {
			font-size: 14px;
			color: #000;
			text-decoration: none;
		}
		
		a.v1:hover {
			font-size: 14px;
			color: #005500;
			text-decoration: none;
		}
		</style>
		<script type="text/javascript"
			src="<%=path%>/plugin/jquery-easyui-1.2.4/jquery-1.6.min.js"></script>
		<script type="text/javascript"
			src="<%=path%>/plugin/jquery-easyui-1.2.4/jquery.easyui.min.js"></script>
		<script type="text/javascript"
			src="<%=path%>/plugin/jquery-easyui-1.2.4/locale/easyui-lang-zh_CN.js"></script>
			
		<script type="text/javascript">
	$(function() {
		$("a").click(function() {
			var text = $(this).text();
			var url = $(this).attr("rel");
			var id = $(this).attr("id");
			var icon = $(this).attr("class");
			addTab(text, url, icon, true, id);
		});

	});

	function addTab(subtitle, url, icon, closable, id) {
		if (!$('#tabs').tabs('exists', subtitle)) {
			$('#tabs').tabs('add', {
				title : subtitle,
				content : createFrame(url, id),
				closable : closable,
				icon : icon
			});
		} else {
			$('#tabs').tabs('select', subtitle);

		}
		tabClose();
	}

	//注：使用iframe即可防止同一个页面出现js和css冲突的问题   大量使用iframe会使页面性能降低
	function createFrame(url, id) {
		var s = '<iframe id="'
				+ id
				+ '" scrolling="auto" frameborder="0"  src="'
				+ url
				+ '" style="width:100%;height:99%;overflow-y: auto; ">__tag_140$146_';
		return s;
	}

	function tabClose() {
		/*双击关闭TAB选项卡*/
		$(".tabs-inner").dblclick(function() {
			var subtitle = $(this).children(".tabs-closable").text();
			$('#tabs').tabs('close', subtitle);
		})
		/*为选项卡绑定右键*/
		$(".tabs-inner").bind('contextmenu', function(e) {
			$('#mm').menu('show', {
				left : e.pageX,
				top : e.pageY
			});

			var subtitle = $(this).children(".tabs-closable").text();

			$('#mm').data("currtab", subtitle);
			$('#tabs').tabs('select', subtitle);
			return false;
		});
	}
</script>
	</head>

	<body class="easyui-layout">
		<noscript>
			<div
				style="position: absolute; z-index: 100000; height: 2046px; top: 0px; left: 0px; width: 100%; background: white; text-align: center;">
				<img src="images/noscript.gif" alt='抱歉，请开启脚本支持！' />
			</div>
		</noscript>
		<div region="north" split="true" border="false"
			style="overflow: hidden; height: 76px; line-height: 20px; color: #fff; font-family: 微软雅黑, 黑体">
			<div class="top">
				<div id="mainlogo">
					OA系统
					<!-- <img src="images/main.gif" width="575" height="72" alt="此处放置一个带有系统名称的图片，大小为“500x72”" />-->
				</div>
				<div id="center">
				</div>
				<div id="mainctrl">
					<div class="wel">
						YY,欢迎您的光临！
					</div>
					<div class="ctr">
						<li>
							<img src="images/yuanjiao.gif" alt="" />
						</li>
						<li>
							<a href="#"> <img src="images/mimaxiugai.gif" alt=""
									border="0" /> </a>
						</li>
						<li class="zi">
							<a href="#" id="ChangePassword" class="v1">密码修改</a>
						</li>
						<li>
							<a href="#"> <img src="images/anquantuichu.gif" alt=""
									border="0" /> </a>
						</li>
						<li class="zi">
							<a href="#" id="loginOut" class="v1">安全退出</a>
						</li>
						<li>
							<a href="#"> <img src="images/bangzhu.gif" border="0">
							</a>
						</li>
						<li class="zi">
							<a href="http://www.langben.com" class="v1">帮助中心</a>
						</li>
						<li>
							<a href="#"> <img src="images/duanxinxi.gif" alt=""
									border="0" /> </a>
						</li>
						<li class="zi">
							<a href="#" class="v1">短消息（0）</a>
						</li>
					</div>
				</div>
			</div>
		</div>
		</div>
		<div region="west" hide="true" split="true" title="导航菜单"
			style="width: 180px;" id="west">
			<div class="easyui-accordion" fit="true" border="false">
				<!-- 1）手风琴效果可伸缩面板加树状显示 
		  	   2）直接使用树状显示，但不适合层级较多的树状-->
				<div title="公告管理" iconCls="tu0901"
					style="overflow: auto; padding: 10px;">
					<a href="#" id="1" class="tu0901" rel="lcd/placard!toList">公告管理</a>
					<br />
					<a href="#" id="1" class="tu0901" rel="User.html">用户e管理</a>
					<br />
					<a href="#" id="1" class="tu0901" rel="User.html">用e户管理</a>
				</div>
				<div title="主菜单二" iconCls="tu0602" selected="true"
					style="padding: 10px;">
					content2
				</div>
				<div title="主菜单三" iconCls="tu1702" style="padding: 10px;">
					更好
				</div>
			</div>
		</div>
		<div id="mainPanle" region="center"
			style="background: #eee; overflow-y: hidden;">
			<div id="tabs" class="easyui-tabs" fit="true" border="false">
				<!--选项卡 -->
			</div>
		</div>
		<div region="south" split="true" style="height: 29px;">
			<div style="padding: 0px; margin-left: 50%;">
				2013-3-12
			</div>
		</div>
		<div id="mm" class="easyui-menu" style="width: 150px;">
			<div id="mm-tabupdate">
				刷新
			</div>
			<div class="menu-sep">
			</div>
			<div id="mm-tabclose">
				关闭
			</div>
		</div>
		<div id="myWindow">
		</div>
	</body>
</html>
